<template>
	<view class="container">
		<!-- 顶部导航栏 -->
		<view class="header">
			<view class="title">我的</view>
			<view class="website">read.yangtse.com</view>
		</view>
		
		<!-- 用户信息 -->
		<view class="user-info">
			<view class="avatar">
				<image src="/static/avatar.png" mode="aspectFill"></image>
			</view>
			<view class="user-detail">
				<view class="nickname">微信用户</view>
				<view class="welcome">欢迎使用扬子晚报微信自助登报</view>
			</view>
		</view>
		
		<!-- 功能菜单 -->
		<view class="menu-section">
			<view class="menu-title">我的服务</view>
			<view class="menu-list">
				<view class="menu-item" @click="goToOrderList">
					<view class="menu-icon order-icon">
						<text class="iconfont">📋</text>
					</view>
					<view class="menu-name">我的订单</view>
					<view class="menu-arrow">
						<text class="iconfont">></text>
					</view>
				</view>
				
				<view class="menu-item" @click="callCustomerService">
					<view class="menu-icon contact-icon">
						<text class="iconfont">📞</text>
					</view>
					<view class="menu-name">联系客服</view>
					<view class="menu-arrow">
						<text class="iconfont">></text>
					</view>
				</view>
				
				<view class="menu-item">
					<view class="menu-icon about-icon">
						<text class="iconfont">ℹ️</text>
					</view>
					<view class="menu-name">关于我们</view>
					<view class="menu-arrow">
						<text class="iconfont">></text>
					</view>
				</view>
			</view>
		</view>
		
		<!-- 联系信息 -->
		<view class="contact-section">
			<view class="contact-item" @click="callCustomerService">
				<text class="contact-label">客服电话：</text>
				<text class="contact-value">13776769686</text>
			</view>
			<view class="contact-item">
				<text class="contact-label">QQ：</text>
				<text class="contact-value">1747152853</text>
			</view>
			<view class="contact-item">
				<text class="contact-label">地址：</text>
				<text class="contact-value">报社</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			goToOrderList() {
				uni.navigateTo({
					url: '/pages/my/order-list'
				});
			},
			
			callCustomerService() {
				uni.makePhoneCall({
					phoneNumber: '13776769686',
					success: () => {
						console.log('拨打电话成功');
					},
					fail: (err) => {
						console.log('拨打电话失败', err);
					}
				});
			}
		}
	}
</script>

<style lang="scss">
	.container {
		min-height: 100vh;
		background-color: #f8f8f8;
		padding-bottom: 40rpx;
	}
	
	.header {
		background: linear-gradient(135deg, #2ecc71, #27ae60);
		color: #fff;
		padding: 80rpx 30rpx 40rpx;
		position: relative;
		box-shadow: 0 2px 10px rgba(0,0,0,0.1);
		
		.title {
			font-size: 36rpx;
			font-weight: 500;
			text-align: center;
		}
		
		.website {
			position: absolute;
			bottom: 10rpx;
			right: 30rpx;
			font-size: 24rpx;
			opacity: 0.8;
		}
	}
	
	.user-info {
		margin: 30rpx;
		background: #fff;
		border-radius: 12rpx;
		padding: 30rpx;
		display: flex;
		align-items: center;
		box-shadow: 0 2px 8px rgba(0,0,0,0.05);
		
		.avatar {
			width: 120rpx;
			height: 120rpx;
			border-radius: 60rpx;
			overflow: hidden;
			margin-right: 30rpx;
			
			image {
				width: 100%;
				height: 100%;
			}
		}
		
		.user-detail {
			flex: 1;
			
			.nickname {
				font-size: 32rpx;
				font-weight: 500;
				color: #333;
				margin-bottom: 10rpx;
			}
			
			.welcome {
				font-size: 26rpx;
				color: #999;
			}
		}
	}
	
	.menu-section {
		margin: 30rpx;
		background: #fff;
		border-radius: 12rpx;
		padding: 30rpx;
		box-shadow: 0 2px 8px rgba(0,0,0,0.05);
		
		.menu-title {
			font-size: 30rpx;
			font-weight: 500;
			color: #333;
			margin-bottom: 30rpx;
		}
		
		.menu-list {
			.menu-item {
				display: flex;
				align-items: center;
				padding: 20rpx 0;
				border-bottom: 1px solid #f5f5f5;
				
				&:last-child {
					border-bottom: none;
				}
				
				.menu-icon {
					width: 60rpx;
					height: 60rpx;
					border-radius: 30rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					margin-right: 20rpx;
					
					&.order-icon {
						background: rgba(46, 204, 113, 0.1);
						color: #2ecc71;
					}
					
					&.contact-icon {
						background: rgba(52, 152, 219, 0.1);
						color: #3498db;
					}
					
					&.about-icon {
						background: rgba(155, 89, 182, 0.1);
						color: #9b59b6;
					}
					
					.iconfont {
						font-size: 32rpx;
					}
				}
				
				.menu-name {
					flex: 1;
					font-size: 28rpx;
					color: #333;
				}
				
				.menu-arrow {
					color: #ccc;
					font-size: 24rpx;
				}
			}
		}
	}
	
	.contact-section {
		margin: 30rpx;
		background: #fff;
		border-radius: 12rpx;
		padding: 30rpx;
		box-shadow: 0 2px 8px rgba(0,0,0,0.05);
		
		.contact-item {
			display: flex;
			margin-bottom: 15rpx;
			
			&:last-child {
				margin-bottom: 0;
			}
			
			.contact-label {
				color: #999;
				font-size: 26rpx;
				margin-right: 10rpx;
			}
			
			.contact-value {
				color: #333;
				font-size: 26rpx;
			}
		}
	}
</style> 